package com.jinlingxiu.app.other.db.dao

import androidx.room.*
import com.jinlingxiu.app.other.db.entity.UserInfoBean

@Dao
interface UserInfoDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertUsers(vararg userInfoBean: UserInfoBean)

    @Update
    suspend fun updateUsers(vararg userInfoBean: UserInfoBean)

    @Delete
    suspend fun deleteUsers(vararg userInfoBean: UserInfoBean)

    @Query("DELETE FROM t_user_info")
    suspend fun deleteAllUsers()

    @Query("SELECT * FROM t_user_info")
    suspend fun loadAllUsers(): Array<UserInfoBean>
}